import pandas as pd
dict={'姓名':['王蒙','李镇','赵乐','刘夜'],
      '职务':['主管','副主管','员工','员工'],
      '基本工资':['8000','7000','5000','5000'],
      '联系方式':['15202369852','15023695820','13621358962','13102659860']}
index=['1','2','3','4']
df=pd.DataFrame(dict, index)
print('原员工的信息: \n', df)
df.loc['5']=['李华','员工','5200','13625362235']
print('增加"李华"后的信息: \n', df)
df.insert(1,'性别',['女','男','男','女','女'])
print('增加"性别"后的信息: \n', df)
df.loc['3','职务']='副部长'
print('修改"赵乐"后的信息: \n', df)
print('主管或副主管的信息: \n', df.loc[(df['职务']=='主管')|(df['职务']=='副主管')])
print('员工工资大于5000的信息: \n', df.loc[(df['基本工资']>=6000)])
df.to_cvs('employee.csv',encoding='GBK')